#ifndef PHYSX_LOGIC_H
#define PHYSX_LOGIC_H

#define NOMINMAX
#include <windows.h>

#include <PhysXLoader.h>
#include <NxPhysicsSDK.h>
#include <NxScene.h>
#include <NxVec3.h>
#include <NxMath.h>
#include <NxMaterial.h>

#include <NxActor.h>

#include <NxShape.h>
#include <NxBoxShape.h>
#include <NxSphereShape.h>

#include "Renderer.h"

class PhysxLogic
{
private:
    static NxPhysicsSDK *physicsSDK;
    static NxScene *physicsScene;

    static NxVec3 *camPos;
    static NxVec3 *camDir;

public:
    static bool Init();
    static void PrepareScene();
    static void SimulateAndRender();
    static void Exit();

    static void HandleKeyboardEvent(unsigned char key, int x, int y);

    static NxActor *CreateBox(const NxVec3 &pos, const NxVec3 &dim, float density);

private:
    static void Draw();

    static void ThrowBall(float size, float power);
};

#endif //PHYSX_LOGIC_H
